1 <?
2 if
(isset($_POST['butSub'])) {
3     $old = $_POST[
'txtOld'];
4     $new1 = $_POST[
'txtNew'];
5     $new2 = $_POST[
'txtNew2'];
6     
if ($new1!=$new2 || $old=="" || $new1=="") echo "<p align=center><font size=2 color=red>Password ch&#432;a &#273;úng</font></p>";
7     
else
8     { $sql =
"update user set password='".$new1."' where user='".$_SESSION['log']."' and pass='".$old."'";
9         
if (mysql_query($sql,$con)) echo "<p align=center><font size=2 color=red>&#272;ã c&#7853;p nh&#7853;t thành công</font></p><br>";
10         
else echo "<p align=center><font size=2 color=red>Không th&#7875; c&#7853;p nh&#7853;t</font></p>";
11     }
12 }
13 ?>
14
15 <body style=
"text-align: center">
16
17 <form method=
"POST" name="FormLoaiSP" action="index.php?act=changepass">
18 <input type=hidden name=
"oldid" value="<? echo $oldid; ?>">
19 <table border=
"1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#0069A8" width="300" id="AutoNumber1">
20   <tr>
21     <td width=
"45%" align="center" class="title" height="20">
22     Thay &#
273;&#7893;i m&#7853;t kh&#7849;u truy c&#7853;p</td>
23   </tr>
24   <tr>
25     <td width=
"45%">
26     <table border=
"0" cellpadding="4" bordercolor="#111111" width="389" id="AutoNumber2" cellspacing="0">
27       <tr>
28         <td width=
"33%" class="smallfont">
29         <p align=
"right">M&#7853;t kh&#7849;u</td>
30         <td width=
"63%" class="smallfont">
31         <INPUT TYPE=
"password" NAME="txtOld" CLASS=textbox size="34"></td>
32       </tr>
33       <tr>
34         <td width=
"33%" class="smallfont">
35         <p align=
"right">M&#7853;t kh&#7849;u m&#7899;i</td>
36         <td width=
"63%" class="smallfont">
37         <INPUT TYPE=
"password" NAME="txtNew" CLASS=textbox size="34"></td>
38       </tr>
39       <tr>
40         <td width=
"33%" class="smallfont">
41         <p align=
"right">nh&#7853;p l&#7841;i m&#7853;t kh&#7849;u m&#7899;i</td>
42         <td width=
"63%" class="smallfont">
43         <INPUT TYPE=
"password" NAME="txtNew2" CLASS=textbox size="34"></td>
44       </tr>
45       <tr>
46         <td width=
"96%" class="smallfont" colspan="2">
47         <p align=
"center">
48         <INPUT TYPE=
"submit" NAME="butSub" VALUE="&#272;&#259;ng nh&#7853;p" CLASS=button>&nbsp;</td>
49       </tr>
50     </table>
51     </td>
52   </tr>
53   </table>
54 </form>



Full source code website bán hàng thương mại điện tử gần giống shopee 468.884 lượt xem

Gõ tìm kiếm nhanh...